.class Lcom/xingbook/huiben/activity/d;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/xingbook/huiben/view/h;


# instance fields
.field final synthetic a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;


# direct methods
.method constructor <init>(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 8

    const/4 v2, -0x1

    const/4 v7, 0x1

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->e(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-eq p1, v0, :cond_0

    if-nez p1, :cond_2

    :cond_0
    if-nez p1, :cond_1

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v0

    add-int/lit8 v2, p1, 0x1

    invoke-virtual {v0, v2}, Lcom/xingbook/huiben/view/ViewPagerModify;->setCurrentItem(I)V

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    const-string v2, "\u5df2\u7ecf\u662f\u7b2c\u4e00\u9875\u4e86"

    invoke-static {v0, v2, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0, v7}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->a(Lcom/xingbook/huiben/activity/HuibenReadingActivity;Z)V

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v0

    add-int/lit8 v2, p1, -0x1

    invoke-virtual {v0, v2}, Lcom/xingbook/huiben/view/ViewPagerModify;->setCurrentItem(I)V

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    const-string v2, "\u5df2\u7ecf\u662f\u6700\u540e\u4e00\u9875\u4e86"

    invoke-static {v0, v2, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/huiben/view/ViewPagerModify;->getCurrentItem()I

    move-result v3

    sget-object v4, Lcom/xingbook/huiben/playitem/HuibenPlayService;->o:Lcom/xingbook/huiben/playitem/HuibenPlayService;

    if-eqz v4, :cond_6

    invoke-virtual {v4}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->i()Landroid/media/MediaPlayer;

    move-result-object v0

    if-eqz v0, :cond_6

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->g(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)I

    move-result v0

    if-eq v3, v0, :cond_5

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0, v3}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;I)V

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->h(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v5

    :try_start_0
    invoke-virtual {v4}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->i()Landroid/media/MediaPlayer;

    move-result-object v0

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->getCurrentPosition()I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    move v1, v0

    :goto_1
    add-int/lit8 v0, v3, 0x1

    iget-object v6, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v6}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->h(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Ljava/util/ArrayList;

    move-result-object v6

    invoke-virtual {v6}, Ljava/util/ArrayList;->size()I

    move-result v6

    if-ge v0, v6, :cond_7

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->h(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Ljava/util/ArrayList;

    move-result-object v0

    add-int/lit8 v3, v3, 0x1

    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    :goto_2
    if-lt v1, v5, :cond_3

    if-eq v0, v2, :cond_4

    if-le v1, v0, :cond_4

    :cond_3
    invoke-virtual {v4}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->i()Landroid/media/MediaPlayer;

    move-result-object v0

    invoke-virtual {v0, v5}, Landroid/media/MediaPlayer;->seekTo(I)V

    :cond_4
    new-instance v0, Landroid/content/Intent;

    const-string v1, "com.111.xingpark.huiben.play.musicservice.action.PLAY"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-virtual {v1, v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    :cond_5
    :goto_3
    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->a(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/activity/f;

    move-result-object v0

    invoke-virtual {v0, v7}, Lcom/xingbook/huiben/activity/f;->removeMessages(I)V

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->a(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/activity/f;

    move-result-object v0

    invoke-virtual {v0, v7}, Lcom/xingbook/huiben/activity/f;->sendEmptyMessage(I)Z

    goto/16 :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1

    :cond_6
    new-instance v2, Landroid/content/Intent;

    const-string v0, "com.111.xingpark.huiben.play.musicservice.action.ACTION_PLAYURL"

    invoke-direct {v2, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v0, "url"

    iget-object v4, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v4}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->d(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/a/a;

    move-result-object v4

    invoke-virtual {v4}, Lcom/xingbook/huiben/a/a;->c()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v0, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v4, "seek"

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->h(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/io/Serializable;

    invoke-virtual {v2, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-virtual {v0, v2}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    iget-object v0, p0, Lcom/xingbook/huiben/activity/d;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    const-string v2, "\u8bf7\u7a0d\u7b49\u00b7\u00b7\u00b7"

    invoke-static {v0, v2, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    goto :goto_3

    :cond_7
    move v0, v2

    goto :goto_2
.end method

.method public a(IFI)V
    .locals 0

    return-void
.end method

.method public b(I)V
    .locals 0

    return-void
.end method
